package arrays_;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author wly
 * @version V1.0.0
 * @date 2022/12/23 16:58
 */
public class ArraysMethod01 {
    public static void main(String[] args) {
        Integer[] arr1 = {1, -1, 7, 0, 89};
        System.out.println(Arrays.toString(arr1));
//        Arrays.sort(arr1);
        Arrays.sort(arr1, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2 - o1;
            }
        });
        System.out.println(Arrays.toString(arr1));
    }
}
